<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>prencar: LineCenter Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="prencar.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">prencar
   &#160;<span id="projectnumber">1</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('class_line_center.html','');
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a>  </div>
  <div class="headertitle">
<div class="title">LineCenter Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="class_line_center.html" title="The LineCenter class centers the car on the line.">LineCenter</a> class centers the car on the line.  
 <a href="class_line_center.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_line_center_8h_source.html">LineCenter.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for LineCenter:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center__inherit__graph.png" border="0" usemap="#_line_center_inherit__map" alt="Inheritance graph"/></div>
<map name="_line_center_inherit__map" id="_line_center_inherit__map">
<area shape="rect" id="node2" href="class_line_follow.html" title="LineFollow" alt="" coords="5,5,88,32"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for LineCenter:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center__coll__graph.png" border="0" usemap="#_line_center_coll__map" alt="Collaboration graph"/></div>
<map name="_line_center_coll__map" id="_line_center_coll__map">
<area shape="rect" id="node2" href="class_line_follow.html" title="LineFollow" alt="" coords="280,277,363,304"/><area shape="rect" id="node4" href="class_move.html" title="Move" alt="" coords="203,187,255,213"/><area shape="rect" id="node18" href="class_extended_move.html" title="Allows to define extended car control instuctions." alt="" coords="57,277,164,304"/><area shape="rect" id="node7" href="class_communication.html" title="Communication" alt="" coords="173,96,285,123"/><area shape="rect" id="node9" href="class_command.html" title="A Command object represents a command sent from the host software." alt="" coords="467,5,548,32"/><area shape="rect" id="node12" href="class_configuration.html" title="Configuration" alt="" coords="25,5,121,32"/><area shape="rect" id="node23" href="struct_move_command.html" title="MoveCommand" alt="" coords="69,187,179,213"/></map>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="class_line_center-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:adee08b78d744f632971ae14d653f36a0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#adee08b78d744f632971ae14d653f36a0">LineCenter</a> ()</td></tr>
<tr class="memitem:a13e69abdd08c2da81f189e69642d980d"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#a13e69abdd08c2da81f189e69642d980d">begin</a> ()</td></tr>
<tr class="memitem:aa466b77cad70e564633e106efde81d4f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#aa466b77cad70e564633e106efde81d4f">doJob</a> ()</td></tr>
<tr class="memitem:a736d4cd402c6dc398b374cae8aab5740"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#a736d4cd402c6dc398b374cae8aab5740">startIt</a> (boolean comingFromLeft)</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a56e3c04c97ecffaa6cd16a16d37992bc"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#a56e3c04c97ecffaa6cd16a16d37992bc">lineCenteringIsFinished</a></td></tr>
<tr class="memdesc:a56e3c04c97ecffaa6cd16a16d37992bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">This variable is set to true as soon as the car is centered completely.  <a href="#a56e3c04c97ecffaa6cd16a16d37992bc"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:a4496fa59d40b06887e2dbc881b9b4ce7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#a4496fa59d40b06887e2dbc881b9b4ce7">doCorrection</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a9b09f8967dc05aa2e65db23b7eb0af47"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_extended_move.html">ExtendedMove</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#a9b09f8967dc05aa2e65db23b7eb0af47">_extMove</a></td></tr>
<tr class="memdesc:a9b09f8967dc05aa2e65db23b7eb0af47"><td class="mdescLeft">&#160;</td><td class="mdescRight">The reference to the extended move class.  <a href="#a9b09f8967dc05aa2e65db23b7eb0af47"></a><br/></td></tr>
<tr class="memitem:a9e851823c54f01bada030c9bd195e059"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#a9e851823c54f01bada030c9bd195e059">_timeLineCenterStarted</a></td></tr>
<tr class="memitem:adb6c4b5e11d9a309fb994e8fd02c630e"><td class="memItemLeft" align="right" valign="top">unsigned long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#adb6c4b5e11d9a309fb994e8fd02c630e">_timeLastLineCenterCheck</a></td></tr>
<tr class="memdesc:adb6c4b5e11d9a309fb994e8fd02c630e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Holds the timestamp of the time when the last curve left check was done.  <a href="#adb6c4b5e11d9a309fb994e8fd02c630e"></a><br/></td></tr>
<tr class="memitem:a19b97d1ed9c6db5886e93f03456751b4"><td class="memItemLeft" align="right" valign="top">boolean&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_line_center.html#a19b97d1ed9c6db5886e93f03456751b4">_centeringFromLeft</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_line_center.html" title="The LineCenter class centers the car on the line.">LineCenter</a> class centers the car on the line. </p>
<p>Centering the car according to the line means, that the car at the end looks in the same direction as the line goes. Depending on the parameter comingFromLeft while calling <a class="el" href="class_line_center.html#a736d4cd402c6dc398b374cae8aab5740">startIt()</a> the car assumes that he is reaching the line from the left or right side. Assuming that the car reaches the line from the left side, the left sensor will at one point measure white ground. Then a corrction is started which means that the car is driving back and turning. After that it starts moving straight forward again. If the car reaches the line again, a new correction will be started again. If at any time both sensors measure black ground (which means the line is between both sensors) the line center process has finished. </p>

<p>Definition at line <a class="el" href="_line_center_8h_source.html#l00019">19</a> of file <a class="el" href="_line_center_8h_source.html">LineCenter.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="adee08b78d744f632971ae14d653f36a0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_line_center.html#adee08b78d744f632971ae14d653f36a0">LineCenter::LineCenter</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructur for the class with the hardware pins to use. </p>

<p>Definition at line <a class="el" href="_line_center_8cpp_source.html#l00009">9</a> of file <a class="el" href="_line_center_8cpp_source.html">LineCenter.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a13e69abdd08c2da81f189e69642d980d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_line_center.html#a13e69abdd08c2da81f189e69642d980d">LineCenter::begin</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Prepares the <a class="el" href="class_line_center.html" title="The LineCenter class centers the car on the line.">LineCenter</a> object to work. The preparations done in here can not be done from within the constructor because of dependencies such as Serial communication. <b>This method needs to be called before this class can be fully used.</b> </p>

<p>Reimplemented from <a class="el" href="class_line_follow.html#afac0ad1ff185b7e5f9b47428cb2e5e48">LineFollow</a>.</p>

<p>Definition at line <a class="el" href="_line_center_8cpp_source.html#l00019">19</a> of file <a class="el" href="_line_center_8cpp_source.html">LineCenter.cpp</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_a13e69abdd08c2da81f189e69642d980d_cgraph.png" border="0" usemap="#class_line_center_a13e69abdd08c2da81f189e69642d980d_cgraph" alt=""/></div>
<map name="class_line_center_a13e69abdd08c2da81f189e69642d980d_cgraph" id="class_line_center_a13e69abdd08c2da81f189e69642d980d_cgraph">
<area shape="rect" id="node3" href="class_extended_move.html#a8ba9c560726a121efa0c78f26780e46a" title="ExtendedMove::getInstance" alt="" coords="177,56,359,83"/><area shape="rect" id="node5" href="class_extended_move.html#a4bf87fc8690c78ea76464cc8d006f528" title="ExtendedMove::ExtendedMove" alt="" coords="408,5,608,32"/><area shape="rect" id="node7" href="class_extended_move.html#aef13add1eb55a57abf64adbf4ae5f149" title="ExtendedMove::begin" alt="" coords="435,56,581,83"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_a13e69abdd08c2da81f189e69642d980d_icgraph.png" border="0" usemap="#class_line_center_a13e69abdd08c2da81f189e69642d980d_icgraph" alt=""/></div>
<map name="class_line_center_a13e69abdd08c2da81f189e69642d980d_icgraph" id="class_line_center_a13e69abdd08c2da81f189e69642d980d_icgraph">
<area shape="rect" id="node3" href="class_curve_left.html#a0e6f8f5d7f869edfaf34cf3e74676a86" title="CurveLeft::begin" alt="" coords="199,5,313,32"/><area shape="rect" id="node10" href="class_move_back_to_line.html#ab5f8b99d6379511c6ed09b4f50432641" title="MoveBackToLine::begin" alt="" coords="177,56,335,83"/><area shape="rect" id="node5" href="class_state_machine.html#a18b495baeae11732b76d252b2b8341c8" title="StateMachine::begin" alt="" coords="384,31,525,57"/><area shape="rect" id="node7" href="class_state_machine.html#a7f7482a9af6910035a62f9c116165f60" title="StateMachine::getInstance" alt="" coords="574,31,751,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a4496fa59d40b06887e2dbc881b9b4ce7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_line_center.html#a4496fa59d40b06887e2dbc881b9b4ce7">LineCenter::doCorrection</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="_line_center_8cpp_source.html#l00107">107</a> of file <a class="el" href="_line_center_8cpp_source.html">LineCenter.cpp</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_cgraph.png" border="0" usemap="#class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_cgraph" alt=""/></div>
<map name="class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_cgraph" id="class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_cgraph">
<area shape="rect" id="node3" href="class_extended_move.html#a816f77b595c0ca03d44dd21b2d4de5ba" title="ExtendedMove::startCurrentQueue" alt="" coords="219,28,440,54"/><area shape="rect" id="node5" href="class_communication.html#a8679b3cb7ceef5527faa24454ce0f18a" title="Communication::send" alt="" coords="1027,28,1175,54"/><area shape="rect" id="node7" href="class_extended_move.html#adfe6e7de87eab16e9a85ad5434819fee" title="ExtendedMove::executeCommand" alt="" coords="519,28,739,54"/><area shape="rect" id="node17" href="class_extended_move.html#a80ce42b3578e4fa17b6b2e3a05a70054" title="ExtendedMove::getCurrentCommandInQueue" alt="" coords="488,78,771,105"/><area shape="rect" id="node10" href="class_move.html#a9c5dc5c3a98abece0c2f40085c3601be" title="Move::controlMotors" alt="" coords="819,78,957,105"/><area shape="rect" id="node13" href="class_move.html#af6b1197771f0540b0becc4117d8d272f" title="Move::setLeftMotorDirection" alt="" coords="1010,78,1193,105"/><area shape="rect" id="node15" href="class_move.html#a06e67dafd581bbd086da404a90c4eeec" title="Move::setRightMotorDirection" alt="" coords="1005,129,1197,156"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_icgraph.png" border="0" usemap="#class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_icgraph" alt=""/></div>
<map name="class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_icgraph" id="class_line_center_a4496fa59d40b06887e2dbc881b9b4ce7_icgraph">
<area shape="rect" id="node3" href="class_line_center.html#aa466b77cad70e564633e106efde81d4f" title="LineCenter::doJob" alt="" coords="219,31,346,57"/><area shape="rect" id="node5" href="class_curve_left.html#a34930d2641dbbd389c536999a560f158" title="CurveLeft::doJob" alt="" coords="417,5,535,32"/><area shape="rect" id="node9" href="class_move_back_to_line.html#a2481a81f7c90dee23d229911c8821e65" title="MoveBackToLine::doJob" alt="" coords="395,56,557,83"/><area shape="rect" id="node7" href="class_state_machine.html#a32064aba8c9fa4afcb649d01aaf5fd78" title="StateMachine::doJob" alt="" coords="605,31,749,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="aa466b77cad70e564633e106efde81d4f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_line_center.html#aa466b77cad70e564633e106efde81d4f">LineCenter::doJob</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Does the job for which this class was written.<br/>
 This method has to be called in regular intervals (as short as possible).<br/>
 The car centers itself on the line. For details see the class comment. </p>

<p>Reimplemented from <a class="el" href="class_line_follow.html#a93ff35747f2ae3bb26998f07243afc3c">LineFollow</a>.</p>

<p>Definition at line <a class="el" href="_line_center_8cpp_source.html#l00053">53</a> of file <a class="el" href="_line_center_8cpp_source.html">LineCenter.cpp</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_aa466b77cad70e564633e106efde81d4f_cgraph.png" border="0" usemap="#class_line_center_aa466b77cad70e564633e106efde81d4f_cgraph" alt=""/></div>
<map name="class_line_center_aa466b77cad70e564633e106efde81d4f_cgraph" id="class_line_center_aa466b77cad70e564633e106efde81d4f_cgraph">
<area shape="rect" id="node3" href="class_line_follow.html#af85fe355ee0699cabc3c817d10aa8b9d" title="LineFollow::readLineSensors" alt="" coords="489,5,677,32"/><area shape="rect" id="node5" href="class_communication.html#a8679b3cb7ceef5527faa24454ce0f18a" title="Communication::send" alt="" coords="1281,107,1429,133"/><area shape="rect" id="node7" href="class_extended_move.html#ae80076eb8ea7ea00e7563e4bbf4657b6" title="ExtendedMove::stopCurrentQueue" alt="" coords="193,107,413,133"/><area shape="rect" id="node10" href="class_extended_move.html#a9bd37ba3d8f98170dd33c8726934735a" title="ExtendedMove::isExecutionInProcess" alt="" coords="182,157,423,184"/><area shape="rect" id="node12" href="class_move.html#a9c5dc5c3a98abece0c2f40085c3601be" title="Move::controlMotors" alt="" coords="1072,208,1211,235"/><area shape="rect" id="node19" href="class_line_center.html#a4496fa59d40b06887e2dbc881b9b4ce7" title="LineCenter::doCorrection" alt="" coords="220,208,385,235"/><area shape="rect" id="node15" href="class_move.html#af6b1197771f0540b0becc4117d8d272f" title="Move::setLeftMotorDirection" alt="" coords="1263,183,1446,209"/><area shape="rect" id="node17" href="class_move.html#a06e67dafd581bbd086da404a90c4eeec" title="Move::setRightMotorDirection" alt="" coords="1259,233,1451,260"/><area shape="rect" id="node21" href="class_extended_move.html#a816f77b595c0ca03d44dd21b2d4de5ba" title="ExtendedMove::startCurrentQueue" alt="" coords="472,183,693,209"/><area shape="rect" id="node24" href="class_extended_move.html#adfe6e7de87eab16e9a85ad5434819fee" title="ExtendedMove::executeCommand" alt="" coords="773,157,993,184"/><area shape="rect" id="node28" href="class_extended_move.html#a80ce42b3578e4fa17b6b2e3a05a70054" title="ExtendedMove::getCurrentCommandInQueue" alt="" coords="741,208,1024,235"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_aa466b77cad70e564633e106efde81d4f_icgraph.png" border="0" usemap="#class_line_center_aa466b77cad70e564633e106efde81d4f_icgraph" alt=""/></div>
<map name="class_line_center_aa466b77cad70e564633e106efde81d4f_icgraph" id="class_line_center_aa466b77cad70e564633e106efde81d4f_icgraph">
<area shape="rect" id="node3" href="class_curve_left.html#a34930d2641dbbd389c536999a560f158" title="CurveLeft::doJob" alt="" coords="204,5,321,32"/><area shape="rect" id="node7" href="class_move_back_to_line.html#a2481a81f7c90dee23d229911c8821e65" title="MoveBackToLine::doJob" alt="" coords="181,56,344,83"/><area shape="rect" id="node5" href="class_state_machine.html#a32064aba8c9fa4afcb649d01aaf5fd78" title="StateMachine::doJob" alt="" coords="392,31,536,57"/></map>
</div>
</p>

</div>
</div>
<a class="anchor" id="a736d4cd402c6dc398b374cae8aab5740"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_line_center.html#a736d4cd402c6dc398b374cae8aab5740">LineCenter::startIt</a> </td>
          <td>(</td>
          <td class="paramtype">boolean&#160;</td>
          <td class="paramname"><em>comingFromLeft</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Starts the car doing the line centering based on the value given in comingFrom. comingFromLeft = true means that the car is reaching the line from the left hand side so the car has to constantly do a left curve until it is centered. comingFromLeft = false means that the car is reaching the line from the right hand side so the car has to constantly do a right curve until it is centered. </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">comingFromLeft</td><td>Set to true if the car drives on top of the line coming from the left side. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_line_center_8cpp_source.html#l00034">34</a> of file <a class="el" href="_line_center_8cpp_source.html">LineCenter.cpp</a>.</p>

<p><div class="dynheader">
Here is the call graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_a736d4cd402c6dc398b374cae8aab5740_cgraph.png" border="0" usemap="#class_line_center_a736d4cd402c6dc398b374cae8aab5740_cgraph" alt=""/></div>
<map name="class_line_center_a736d4cd402c6dc398b374cae8aab5740_cgraph" id="class_line_center_a736d4cd402c6dc398b374cae8aab5740_cgraph">
<area shape="rect" id="node3" href="class_communication.html#a8679b3cb7ceef5527faa24454ce0f18a" title="Communication::send" alt="" coords="179,5,327,32"/></map>
</div>
</p>

<p><div class="dynheader">
Here is the caller graph for this function:</div>
<div class="dyncontent">
<div class="center"><img src="class_line_center_a736d4cd402c6dc398b374cae8aab5740_icgraph.png" border="0" usemap="#class_line_center_a736d4cd402c6dc398b374cae8aab5740_icgraph" alt=""/></div>
<map name="class_line_center_a736d4cd402c6dc398b374cae8aab5740_icgraph" id="class_line_center_a736d4cd402c6dc398b374cae8aab5740_icgraph">
<area shape="rect" id="node3" href="class_curve_left.html#a34930d2641dbbd389c536999a560f158" title="CurveLeft::doJob" alt="" coords="201,5,319,32"/><area shape="rect" id="node7" href="class_move_back_to_line.html#a2481a81f7c90dee23d229911c8821e65" title="MoveBackToLine::doJob" alt="" coords="179,56,341,83"/><area shape="rect" id="node5" href="class_state_machine.html#a32064aba8c9fa4afcb649d01aaf5fd78" title="StateMachine::doJob" alt="" coords="389,31,533,57"/></map>
</div>
</p>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="a19b97d1ed9c6db5886e93f03456751b4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="class_line_center.html#a19b97d1ed9c6db5886e93f03456751b4">LineCenter::_centeringFromLeft</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>centeringFromLeft = true means that the car is reaching the line from the left hand side so the car has to constantly do a left curve until it is centered. centeringFromLeft = false means that the car is reaching the line from the right hand side so the car has to constantly do a right curve until it is centered. </p>

<p>Definition at line <a class="el" href="_line_center_8h_source.html#l00048">48</a> of file <a class="el" href="_line_center_8h_source.html">LineCenter.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9b09f8967dc05aa2e65db23b7eb0af47"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_extended_move.html">ExtendedMove</a>* <a class="el" href="class_line_center.html#a9b09f8967dc05aa2e65db23b7eb0af47">LineCenter::_extMove</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>The reference to the extended move class. </p>

<p>Definition at line <a class="el" href="_line_center_8h_source.html#l00035">35</a> of file <a class="el" href="_line_center_8h_source.html">LineCenter.h</a>.</p>

</div>
</div>
<a class="anchor" id="adb6c4b5e11d9a309fb994e8fd02c630e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long <a class="el" href="class_line_center.html#adb6c4b5e11d9a309fb994e8fd02c630e">LineCenter::_timeLastLineCenterCheck</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Holds the timestamp of the time when the last curve left check was done. </p>
<dl class="section see"><dt>See also:</dt><dd><a class="el" href="class_line_center.html#aa466b77cad70e564633e106efde81d4f">doJob()</a> </dd></dl>

<p>Definition at line <a class="el" href="_line_center_8h_source.html#l00042">42</a> of file <a class="el" href="_line_center_8h_source.html">LineCenter.h</a>.</p>

</div>
</div>
<a class="anchor" id="a9e851823c54f01bada030c9bd195e059"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned long <a class="el" href="class_line_center.html#a9e851823c54f01bada030c9bd195e059">LineCenter::_timeLineCenterStarted</a><code> [private]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This variable holds the timestamp when the line centering process was started. </p>

<p>Definition at line <a class="el" href="_line_center_8h_source.html#l00040">40</a> of file <a class="el" href="_line_center_8h_source.html">LineCenter.h</a>.</p>

</div>
</div>
<a class="anchor" id="a56e3c04c97ecffaa6cd16a16d37992bc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">boolean <a class="el" href="class_line_center.html#a56e3c04c97ecffaa6cd16a16d37992bc">LineCenter::lineCenteringIsFinished</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This variable is set to true as soon as the car is centered completely. </p>
<p>With other words this means that the difference between both sensors is below the value defined in <a class="el" href="class_configuration.html#aebf76a63207191515e8fc7a61ae6b51e" title="During line centering a value below this difference will mean, that the line centering process is fin...">Configuration::lineCenterLineInMiddleDifference</a>. </p>

<p>Definition at line <a class="el" href="_line_center_8h_source.html#l00033">33</a> of file <a class="el" href="_line_center_8h_source.html">LineCenter.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Workspace/Arduino/prencar/<a class="el" href="_line_center_8h_source.html">LineCenter.h</a></li>
<li>D:/Workspace/Arduino/prencar/<a class="el" href="_line_center_8cpp_source.html">LineCenter.cpp</a></li>
</ul>
</div><!-- contents -->
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="class_line_center.html">LineCenter</a>      </li>

    <li class="footer">Generated on Thu Jun 7 2012 20:47:46 for prencar by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.0 </li>
   </ul>
 </div>


</body>
</html>
